package org.xlx.xlx_oa.common;

/**
 * BusinessException:业务逻辑异常，所有与程序校验或者业务逻辑相关的异常都可以放在这个类中；
 */
public class BusinessException extends RuntimeException {
    private String code; //异常编码，异常的以为标识；
    private String message; //异常的具体文本消息

    public BusinessException(String code, String msg) {
        super(code + ":" + msg);
        this.code = code;
        this.message = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}